from rest_framework import serializers
from apps.models import HouseKeeping


class ListThingSerializer(serializers.ModelSerializer):
    # 额外字段
    classification_title = serializers.ReadOnlyField(source='classification.title')

    class Meta:
        model = HouseKeeping
        # 排除字段
        exclude = ('wish', 'collect',)


class AddWishSerializer(serializers.ModelField):
    class Meta:
        fields = ['wish_count']